<?php
/**
 * Created by PhpStorm.
 * User: lihao
 * Date: 2017/1/4
 * Time: 下午6:49
 */
class Weather_model extends CI_Model {

    public function __construct() {
        parent::__construct();
    }
    //插入新的图片
    public function insertImage($data) {
        $result = $this->db->insert('skimimage', $data);
        return $result;
    }

    //查询该分类下的所有图片
    public function getImages($imgtype) {
        $sqlStr = "select * from skimimage where typeid = ".$imgtype;
        $result = $this->db->query($sqlStr);
        return $result->result();
    }
}